<template>
    <div>
      <el-form
        ref="elForm"
        size="small"
        label-width="120px"
        :model="formData"
      >
        <el-form-item label="申请人基本信息 :"></el-form-item>
        <el-row type="flex" justify="start" align="top">
          <el-form-item label="申请人ID :" prop="field280" v-if="false">
            </el-form-item>
          <el-col :span="12">
            <el-form-item label="申请人 :" prop="field109">
              <el-input
                v-model="formData.proposerName"
                placeholder="请输入信息"
                clearable
                :style="{ width: '100%' }"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="户籍地址 :" prop="field121">
              <el-input
                v-model="formData.proposerAddress"
                placeholder="请输入户籍地址"
                clearable
                :style="{ width: '100%' }"
              >
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex" justify="start" align="top">
          <el-col :span="12">
            <el-form-item label="联系电话 :" prop="field123">
              <el-input
                v-model="formData.proposerPhone"
                placeholder="请输入联系电话"
                clearable
                :style="{ width: '100%' }"
                @blur="updateProposer"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="证件号码 :" prop="field124">
              <el-input
                v-model="formData.proposerCard"
                placeholder="请输入证件号码"
                clearable
                :style="{ width: '100%' }"
              >
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex" justify="start" align="top">
          <el-col :span="12">
            <el-form-item label="代理人 :" prop="field129">
              <el-input
                v-model="formData.proxyName"
                placeholder="请输入代理人"
                clearable
                :style="{ width: '100%' }"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="证件号码 :" prop="field130">
              <el-input
                v-model="formData.proxyCard"
                placeholder="请输入证件号码"
                clearable
                :style="{ width: '100%' }"
              >
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>


      <el-form
        ref="elForm"
      
        size="small"
        label-width="120px"
      >
        <el-form-item label="房产基本信息 :"></el-form-item>
        <el-row type="flex" justify="start" align="top">
          <el-col :span="8">
            <el-form-item label="房间编号 :" prop="roomNo">
              <el-input
              v-model="formData2.roomNo"
                placeholder="请输入信息"
                clearable
                :style="{ width: '100%' }"
                @blur="loadRooms"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="区 :" prop="higherDistrict">
              <el-input
                v-model="rules2.higherDistrict"
                placeholder="请输入信息"
                clearable
                :style="{ width: '100%' }"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="建筑区域 :" prop="higherZoning">
              <el-input
                v-model="rules2.higherZoning"
                placeholder="请输入建筑区域"
                clearable
                :style="{ width: '100%' }"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="9">
            <el-form-item label="丘地号 :" prop="higherMound">
              <el-input
                v-model="rules2.higherMound"
                placeholder="请输入丘地号"
                clearable
                :style="{ width: '100%' }"
              >
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex" justify="start" align="top">
          <el-col :span="6">
            <el-form-item label="登记种类 :" prop="field138">
              <el-input
                v-model="formData2.field138"
                placeholder="请输入登记种类"
                clearable
                :style="{ width: '100%' }"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="房屋性质 :" prop="higherRoomType">
              <el-input
                v-model="rules2.higherRoomType"
                placeholder="请输入房屋性质"
                clearable
                :style="{ width: '100%' }"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="取得方式 :" prop="higherSrcid">
              <el-input
                v-model="rules2.higherSrcid"
                placeholder="请输入取得方式"
                clearable
                :style="{ width: '100%' }"
              >
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex" justify="start" align="top">
          <el-col :span="6">
            <el-form-item label="房屋坐落 :" prop="higherRoomRepose">
              <el-input
                v-model="rules2.higherRoomRepose"
                placeholder="请输入房屋坐落"
                clearable
                :style="{ width: '100%' }"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="分户图 :" prop="higherPlan">
              <el-input
                v-model="rules2.higherPlan"
                placeholder="请输入分户图"
                clearable
                :style="{ width: '100%' }"
              >
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>


       <!-- <div>
        <el-form ref="elForm" :model="formData3" :rules3="rules3" size="small" label-width="100px"
        style="width: 100%;line-height: 10%;"
      label-position="top">
    <el-form-item label="共有人基本信息" size="50px"></el-form-item>
      <el-row>
        <el-col :span="4">
          <el-form-item label="共有人姓名" prop="field102">
            <el-input v-model="formData3.field102" placeholder="" clearable :style="{width: '90%'}">
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="证件号码" prop="field103">
            <el-input v-model="formData3.field103" placeholder="" clearable :style="{width: '90%'}">
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="户籍地址" prop="field104">
            <el-input v-model="formData3.field104" placeholder="" clearable :style="{width: '90%'}">
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="共有方式" prop="field105">
            <el-input v-model="formData3.field105" placeholder="" clearable :style="{width: '90%'}">
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="共有份额" prop="field106">
            <el-input v-model="formData3.field106" placeholder="" clearable :style="{width: '90%'}">
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="联系方式" prop="field132">
            <el-input v-model="formData3.field132" placeholder="" clearable :style="{width: '90%'}">
            </el-input>
          </el-form-item>
        </el-col>
      </el-row> 
        </el-form>
      </div>  -->
        <div>
        <el-form
          ref="elForm"
          :model="formData4"
          :rules4="rules4"
          size="medium"
          label-width="220px"
        >
          <el-form-item label="交验证件 " size="50px"></el-form-item>
          <el-row>
            <el-col :span="8">
              <el-form-item label="登记申请书一份 :" prop="field164">
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="未选择文件" prop="field165">
                <el-button
                  type="primary"
                  icon="el-icon-picture-outline"
                  size="medium"
                >
                  选择文件
                </el-button>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item label="身份证复印件一份 :" prop="field166">
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="未选择文件" prop="field167">
                <el-button
                  type="primary"
                  icon="el-icon-picture-outline"
                  size="medium"
                >
                  选择文件
                </el-button>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item label="一寸照片一张 :" prop="field168">
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="未选择文件" prop="field169">
                <el-button
                  type="primary"
                  icon="el-icon-picture-outline"
                  size="medium"
                >
                  选择文件
                </el-button>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item label="购房发票复印件一份 :" prop="field170">
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="未选择文件" prop="field171">
                <el-button
                  type="primary"
                  icon="el-icon-picture-outline"
                  size="medium"
                >
                  选择文件
                </el-button>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item
                label="购房合同复印件（已备案）一份 :"
                prop="field172"
              >
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="未选择文件" prop="field173">
                <el-button
                  type="primary"
                  icon="el-icon-picture-outline"
                  size="medium"
                >
                  选择文件
                </el-button>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item label="契税完税证复印件一份 :" prop="field174">
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="未选择文件" prop="field175">
                <el-button
                  type="primary"
                  icon="el-icon-picture-outline"
                  size="medium"
                >
                  选择文件
                </el-button>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row> </el-row>
          <el-form-item size="large">
            <el-button type="primary" @click="tjsh">提交审核</el-button>
            <el-button >全部清空</el-button>
          </el-form-item>
        </el-form>
      </div>  
    </div>
</template>
<script>
  export default{
  components: {},
  props: [],
  methods: {
    updateProposer(){
      this.$axios.put("/register-serv/Proposers/update",this.formData)
      .then((res)=>{
        this.$message({
          message: '修改成功',
          type: 'success'
        });
      });
    },
    
    loadRooms(){
      this.$axios.post("/register-serv/rooms/selectAll2",this.formData2)
      .then((res)=>{
        if(res.data.data.rooms!=null){
        this.rules2 = res.data.data.rooms;
      }
      });
    },
    tjsh(){
      
       this.$axios.put("/register-serv/Ownership/update",this.ower)
      .then((res)=>{
        this.$message({
          message: '审核成功',
          type: 'success'
        });
      });
      sessionStorage.setItem('roomNo',JSON.stringify(this.formData2.roomNo) )
      this.$router.push({path: '/Examine',query:{ roomNo:(this.formData2.roomNo)}});
    }

  },
  data() {
    return {
      ower:{
        ownerId:'',
        precontractStatus:'<已入库>'
      },
      formData: {
        proposerId:'',
        proposerName:'',
        proposerCard:'', 
        proxyName:'',
        proxyCard:'',
      },
      formData2: {
        roomNo:"",
      },
      formData3: {},
      formData4: {},
      rules: {
        field280: '',
        field109: '',
        field121: '',
        field123: '',
        field124: '',
        field129: '',
        field130: '',
      },
      rules2: {
       
      },
      rules3: {
        field102:'',
        field103: '',
        field104: '',
        field105: '',
        field106: '',
        field132: '',
      },
      rules4: {
        field164:'',
        field165: '',
        field166: '',
        field167: '',
        field168: '',
        field169: '',
        field170: '',
        field171: '',
        field172: '',
        field173: '',
        field174: '',
        field175: '',
      },
    };
  },
mounted(){
  this.formData.proposerCard=this.$route.query.proposerCard;
  this.formData.proposerName=this.$route.query.proposerName;
  this.formData.proposerId=this.$route.query.proposerId;
  this.rules2.field138=this.$route.query.demurTypeName;
  this.ower.ownerId=this.$route.query.demurLoginId
  this.formData2 = this.rules2;
  



}


};
</script>
<style>
.el-table .warning-row {
  background: oldlace;
}

.el-table .success-row {
  background: #f0f9eb;
}
</style>